10000 - Longest Paths (Grafos, BFS, Dijkstra)
[andmenj-acm.git] / 10482 - The candyman can / 10482.cpp
blob656a0acb1e637949125967a05f98ed07a69efef6
1 #include <iostream>
3 using namespace std;
6 void printBinary(const int& x){
7 unsigned mask = 0x80000000;
8 while (mask){
9 cout << ((x & mask)?1:0);
10 mask >>= 1;
12 cout << endl;
15 int main(){
16 unsigned x;
17 for (int i = 0; i<=32; ++i){
18 x = 1 << i;
19 printf("%u\n", x);
20 //printf("%X\n", x);
21 printBinary(x);
23 return 0;